package com.mongodb.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.data.mongodb.core.mapping.Field;

import java.util.Date;

@Data
public class User {
    @Field("_id")
    private String id;

    @Field("username")
    private String username;

    @Field("password")
    private String password;

    //更新时间
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Field("updatedTime")
    private Date updatedTime;

    //创建时间
    @Field("createdTime")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createdTime;


}
